<?php
$mime = substr($_GET['get'],strlen($_GET['get'])-3,strlen($_GET['get']));
if($mime=='css'){
header('mime-type:text/css');
$ctype = 'text/css';
$Type = 'CSS';
}elseif($mime=='.js'){
header('mime-type:text/javascript');
$ctype = 'text/javascript';
$Type = 'JavaScript';
}elseif($mime=='jpg'){
header('mime-type:image/jpg');
$ctype = 'image/jpg';
header("Content-Transfer-Encoding: binary");
$Type = 'Graphics';
}elseif($mime=='gif'){
header('mime-type:image/gif');
$ctype = 'image/gif';
header("Content-Transfer-Encoding: binary");
$Type = 'Graphics';
}elseif($mime=='png'){
header('mime-type:image/png');
$ctype = 'image/png';
header("Content-Transfer-Encoding: binary");
$Type = 'Graphics';
}elseif($mime=='bmp'){
header('mime-type:image/bmp');
$ctype = 'image/bmp';
header("Content-Transfer-Encoding: binary");
$Type = 'Graphics';
}
header("Content-Type: $ctype");
if(isset($_GET['Parent'])){$Type = $_GET['Parent'];}
$text =  file_get_contents('../../../Shared/'.$Type.'/'.$_GET['get']);
print str_replace('url(../../','url(bin.php?Parent='.$Type.'&get=',$text);
?>
